
do {
   log("hello world")
} while (true)

do
{
   a += 2;
}
while (1);


do {
   something();
}
while
(x < 5);


while (true) {
   f();
}


while (x < 10)
{
   f();
   if ( x == 4 ) continue
   f2();
}

while ( true ) {
   break;
}


while (x < 10) f();


for ( var i = 0; i < 10; i++ )
   say("hello");

for (var len = array.length,i = 0; i < len; )
{
   doSomething();
   i += 1;
}

for (var i = arr.length; i >= 0; i--)
   if (isWhatever(arr[i]))
      doThat(arr[i]);

// nobody uses this style anyway...
for
(
var i;
;
)
   forFun()


for (var a,b,c;;);

for (var i = 0; i < 10; ++i)
   for (var j = 0; j < 5; ++j)
      doIt(i, j);

for (var i=0; i < x; i += 1) {
   for (var j=0; j < y; j++)
      doThat(j, i)
}


for (i = 0; i < 10; i++)
   whatever(i);

for(i=0,j=10; i<10 && j>0; i++,j++) {
   doIt(i,j);
}

for (i = j = 10;;) infinity();


for (var p in obj)
   doSomething(obj[p])

for (p in obj)
   doSomething(obj[p])

// weird but valid
for (var p = 1 in obj)
   doIt(obj[p])

for
(var p
in
obj)
{ doIt(obj[p]); }

// Mozilla JavaScript 1.6 for each extension
/*
for each (var v in obj);

for each(v in obj) {
   doThat(v);
}

for
each (var v in obj)
doThat(v)

for each
( var
pval in obj)
{ yes(pval); }
*/

// with labels...

while (true) {
   genval: var val = getRandomValue();

   if ( val > 10 ) break;

   var i = 0;   
   while (true) {
      doThat(i++);
      if ( i > 10 ) continue genval;
   }
}


for (var i = 0;; i++) {
   if ( i > 50 ) break exit;
}

exit:
free();

